xen/arm: Sign extend TimerValue when computing the CompareValue
authorJeff Kubascik <jeff.kubascik@dornerworks.com>
Tue, 21 Jan 2020 15:07:04 +0000 (10:07 -0500)
committerJulien Grall <julien@xen.org>
Mon, 27 Jan 2020 11:55:01 +0000 (11:55 +0000)
commit3c601c5f056fba055b7a1438b84b69fc649275c3
treef20880f05d7122734204b99226d39920a54b4fb3
parentf14f55b7ee295277c8dd09e37e0fa0902ccf7eb4
xen/arm: Sign extend TimerValue when computing the CompareValue

Xen will only store the CompareValue as it can be derived from the
TimerValue (ARM DDI 0487E.a section D11.2.4):

  CompareValue = (Counter[63:0] + SignExtend(TimerValue))[63:0]

While the TimerValue is a 32-bit signed value, our implementation
assumed it is a 32-bit unsigned value.

Signed-off-by: Jeff Kubascik <jeff.kubascik@dornerworks.com>
Acked-by: Julien Grall <julien@xen.org>
xen/arch/arm/vtimer.c